home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / DEMONSTR / STDM13.ZIP / README.TXT < prev    next >
Text File  |  1993-06-23  |  22KB  |  650 lines

  1.             Stdemo Player 1.3 
  2.         Copyright (c) 1992,1993 Mik Kvitchko
  3.  
  4. -----------------------------
  5. | Mikhail Kvitchko          |
  6. | 361-A Crowells Road,      |
  7. | Highland Park, NJ 08904   |
  8. | USA                       |
  9. | mik@bhsw.com              |
  10. -----------------------------
  11.  
  12. This package consists of the following files:
  13.  
  14. HIST.TXT    - History of changes
  15. README.TXT    - This File
  16. SCRIPT.TXT    - Stdemo Player example script
  17. STDEMO.DIZ    - Stdemo Player short description.
  18. STDEMO.EXE    - Stdemo Player program
  19. STHOOK.DLL    - Stdemo Player DLL
  20.  
  21. What is this?
  22. =============
  23.  
  24. Stdemo Player is the application that you can use to create demos, 
  25. tutorials or manually prepare scripts to "play" them into any Windows 
  26. application. It allows you to write a script, which will start one or 
  27. several Windows application, perform a series of keystrokes or mouse 
  28. actions aimed to demonstrate the application or to perform some pre-
  29. defined sequence of actions. While your script is being "played", you 
  30. can disable completely keyboard and mouse, so that user will not be 
  31. able to interfere with the running demo and to cause a conflict. At 
  32. certain points of you script you may interrupt it in order to interact 
  33. with user. These interactions allow:
  34.  
  35. -    to show the "text" box with some explanatory text before script 
  36.     will continue ( this is the main idea of how demos
  37.     and tutorials are to be designed);
  38.  
  39. -    to show the "menu" box where user can select one of several 
  40.     choices, and therefore control the script's execution;
  41.  
  42. -    to show the "input" box, where user can answer questions and 
  43.     enter some text, which later can be used in script.
  44.  
  45. There are many varieties of these boxes in order to make your demo 
  46. flexible, and they can be forced to be shown in some convenient places 
  47. on the screen. Moreover, user can move them across the screen to be 
  48. able to see different parts of the covered windows.
  49.  
  50. Even if you are not interested in preparing demos, you may find Stdemo 
  51. Player useful. For example, you can replace your complete Startup Group 
  52. to the single Stdemo Player script which will launch
  53. all your "startup" applications, and even perform some initial actions 
  54. for every of them: set up default options, load files, etc.
  55.  
  56. How to play the script?
  57. ======================
  58.  
  59. When you run stdemo.exe without parameters, it looks for the file 
  60. "script.txt" in the current working directory, and if it is there - 
  61. "plays" it. 
  62.  
  63. Also you may pass the name of the script as a parameter to stdemo.exe. 
  64. This name may include the full path.
  65.  
  66.  
  67. How to write a script?
  68. ======================
  69.  
  70. Script is a plain ASCII text file. It may include:
  71.  
  72. -    keystrokes;
  73. -    commands;
  74. -    interaction breaks;
  75. -    comments.
  76.  
  77. Every keystroke, command or interaction break is a unit. Stdemo Player 
  78. reads units from the script one by one and executes them. After one 
  79. unit is executed, Stdemo Player waits for some time (time-out tick, 
  80. which can be set or changed at any point in the script) and then 
  81. executes the next unit. Time-out doesn't affect the interaction breaks 
  82. (which are "text", "menu" and "input" dialog boxes). Once one of this 
  83. boxes is shown - only user may continue or stop script execution, 
  84. selecting "Continue" or "Stop" button on the box. Comments are ignored, 
  85. as you may expect, and cause no time-out delays.
  86.  
  87. 1. Keystrokes.
  88. --------------
  89.  
  90. Any text in the script which is not a command, interaction break or 
  91. comment is a set of keystrokes, i.e. every symbol of the text causes a 
  92. keystroke to be sent into the current window application (see  below).
  93. There are also several special symbols which allow to simulate 
  94. different keyboard keys.
  95.  
  96. Any keystroke can be preceded by one or more special symbols 
  97. ("@" - Alt, "#" - Shift or/and "%" - Control) as you see in the 
  98. following example:
  99.  
  100. @A    Alt-A
  101. #A    Shift-A
  102. %A    Ctrl-A
  103. #%A    Shift-Ctrl-A
  104.  
  105. There are also many special keys which are coded by "escaping" them 
  106. with the "]". They are follows:
  107.  
  108. ]|    Down
  109. ]^    Up
  110. ]<    Left
  111. ]>    Right
  112. ]~    Tab
  113. ]!    Return
  114. ]-    PgUp
  115. ]+    PgDn
  116. ]\    Backspace
  117. ]Z    Esc
  118. ]I    Ins
  119. ]D    Del
  120. ]H    Home
  121. ]E    End
  122. ]0    F10
  123. ]1    F1
  124. ...........
  125. ]9    F9
  126. ]]    ]
  127. ]@    @
  128. ]%    %
  129. ]#    #
  130. ]:    :
  131. ]$    $
  132.  
  133. This is not a full set of the keyboard keys, as you may note - but it 
  134. covers most of usable ones (I hope).
  135.  
  136. 2. Commands.
  137. ------------
  138.  
  139. All commands start from the colon sign ":". Some of the commands must 
  140. be coded as a separate line in a script, others can be mixed with the 
  141. keystrokes. The rule of a thumb is: if a command has fixed format or 
  142. ends with the special separator - it can be placed anywhere, otherwise 
  143. it has to be coded as a separate line of the script. The general format 
  144. of a command is:
  145.     :<code><parameters>
  146. <code> is a single letter or some other symbol;
  147. <parameters> may vary; one parameter can be a letter, text or number; 
  148. parameters follow the code without blank, and in some cases are 
  149. separated one from another by the special separator "|".
  150.  
  151. The commands are:
  152.  
  153. :=x            set time-out tick to x milliseconds.
  154.             Default time-out is 1 millisecond.
  155.     Example:
  156.     :=1000    set time-out tick to 1 sec.
  157.  
  158. :T            skip 1 time-out tick.
  159.     Example:
  160.     abc:T:T:Tefg    enter "abc", then wait for three 
  161.             current time-out ticks, then enter
  162.             "efg".
  163.  
  164. :Dtext            change current directory to "text". 
  165.     Example:
  166.     :Dc:\windows\system
  167.  
  168. :<caption string|x    find and activate already running application;
  169.             flag x may be coded as one digit 0..2 after the 
  170.             separator and affects the size of the
  171.             application window: 0 (default), 1(maximize),
  172.             2(minimize).
  173.     Examples:
  174.     :<Notepad - (Untitled)|1
  175.  
  176. :)            kill the last application in stack (if exists).
  177.  
  178.     Note:    Stdemo Player allows to start several applications.
  179.         It keeps track of the applications being started in 
  180.         the internal stack ( max. 10 entries). When you start
  181.         a new application, the following keystrokes will be 
  182.         sent into the new application window, as it will
  183.         get focus after the launch. You must issue ":)" -
  184.         kill last application - command, even when you finish
  185.         the application using it's menu commands - so that
  186.         Stdemo Player could handle the stack of current
  187.         applications properly.
  188.         There is no command ( so far ) to switch focus from
  189.         one application to another. Though you can do this by
  190.         simulating mouse clicking in the proper window. Just
  191.         make sure that you close applications in the reverse
  192.         order as you started them, and issue correspondent
  193.         ":)" commands in the same reverse order.
  194.         
  195. :Iab        enable/disable Windows input;
  196.             parameter "a" must be coded as one digit:
  197.             0 - disable input, 1 - enable input;
  198.             parameter "b" is also 1 digit:
  199.             0 - temporarily, 1 - permanently.
  200.     Example:
  201.     :I10    enable input until the next interaction break.
  202.  
  203.     Note:    When stdemo starts, it disables Windows input
  204.         (keyboard and mouse buttons) in order to prevent
  205.         user's intervention into the actions being played.
  206.         When one of the interaction breaks occurs, the input
  207.         is partially restored to allow user interaction 
  208.         inside the dialog box only. When script continues,
  209.         the state is restored as it was before the break.
  210.         "Temporarily change the state of Windows input" means
  211.         "until the next interaction break occurs". Permanent
  212.         change affects all subsequent script play and can be 
  213.         changed with the next ":I" command only.
  214.  
  215. :Cab        show/hide Windows cursor;
  216.             parameter "a" must be coded as one digit:
  217.             0 - hide cursor, 1 - show cursor;
  218.             parameter "b" is also 1 digit:
  219.             0 - temporarily, 1 - permanently.
  220.     Example:
  221.     :C11    show Windows cursor until further ":C" command.
  222.  
  223.     Note:    When stdemo starts, it hides Windows cursor.
  224.         When one of the interaction breaks occurs, the cursor
  225.         is restored to allow user interaction inside the
  226.         dialog box only. When script continues, the state is
  227.         restored as it was before the break.
  228.         "Temporarily change the visibility of cursor" means
  229.         "until the next interaction break occurs". Permanent
  230.         change affects all subsequent script play and can be 
  231.         changed with the next ":C" command only.
  232.  
  233. :Ltext            assign the label "text" to the